package com.codingapi.p2p.client.listener;

import com.codingapi.p2p.client.service.InitService;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Service;

/**
 * create by lorne on 2018/3/13
 */
@Service
public class ApplicationListener implements ApplicationContextAware {

    @Autowired
    private InitService initService;

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        initService.start();
    }


}
